/*
 * @Author: your name
 * @Date: 2020-07-26 21:43:30
 * @LastEditTime: 2020-07-27 22:20:50
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \ts\react-router-app\src\AppRouter.js
 */

 import React, { Component } from 'react';
 import {
   BrowserRouter as Router,
   Route,
   Link,
   Switch,
   Redirect,
 } from 'react-router-dom'

 import IndexPage from './pages/index_page'
 import ListPage from './pages/list_page'
 import DetailsPage from './pages/details_page'
 import Auth from './auth'
 import './approuter.css'

function AppRouter(){

  return (
        <Router>
          <Auth></Auth>
          <Switch>
              <Route path="/" component={IndexPage} exact></Route>
              <Route path="/list/:id" component={DetailsPage} ></Route>
              <Route path="/list" component={ListPage} ></Route>
          </Switch>
        </Router>
  );
}


export default AppRouter
